package org.yjc.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Service;
import org.yjc.entity.Journal;
import org.yjc.repository.JournalRepository;

@Service
public class JournalService {
	@Autowired
	private JournalRepository journalDAO;

	public void save(Journal journal) {
		journalDAO.save(journal);
	}

	public Page<Journal> findAll(Specification<Journal> spec, Pageable pageable) {
		return journalDAO.findAll(spec, pageable);
	}
}
